import random

def single_line():
    coins = [random.choice([2, 3]) for _ in range(3)]
    total = sum(coins)
    if total == 6:
        return "⚋（老阴，变爻）"
    elif total == 7:
        return "⚊（少阳，静爻）"
    elif total == 8:
        return "⚋（少阴，静爻）"
    elif total == 9:
        return "⚊（老阳，变爻）"

def cast_hexagram():
    lines = []
    for i in range(6):
        line = single_line()
        lines.append(line)
    return lines[::-1]  # 上爻在上

print("\n--- 易经起卦 ---")
hexagram = cast_hexagram()
for idx, line in enumerate(hexagram, 1):
    print(f"第{idx}爻：{line}")
